//	@file Version: 1.0
//	@file Name: ADP_F_getItem.sqf
//	@file Author: THumbert
//	@file Created: 12/14/2013
//	@file Description: Spawns selected Item

_listbox = _this select 0;
_weapon = _this select 1;
_type = _this select 2;
_ammo = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
_ammotype = _ammo select 0;
switch (_type) do  
{
	case 5: {removeBackPack player; player addBackPack _weapon};
	case 6: {player addItem _weapon};
	case 7: { switch true do {
		case (getNumber(configFile >> "cfgWeapons" >> _weapon >> "ItemInfo" >> "type")==801): { player addUniform _weapon};
		case (getNumber(configFile >> "cfgWeapons" >> _weapon >> "ItemInfo" >> "type")==701): { player addVest _weapon};
		case (getNumber(configFile >> "cfgWeapons" >> _weapon >> "ItemInfo" >> "type")==605): { player addHeadgear _weapon};
		case (getNumber(configFile >> "cfgWeapons" >> _weapon >> "ItemInfo" >> "type")==603): { player addGoggles _weapon};
		};};
	case 8: {player addPrimaryWeaponItem _weapon; player addHandgunItem _weapon;};
};

